package com.cdh.utils.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author by cdh
 * @description:
 * @Date: Created in 10:35 on 2021/3/3
 */

public class FormUtil {
    /**
     * 手机号验证
     * @param str
     * @return
     */
    public static boolean isMobile(String str) {
        // 验证手机号
        Pattern p = Pattern.compile("^[1][3,4,5,7,8,9][0-9]{9}$");
        Matcher m = p.matcher(str);
        return m.matches();
    }
}
